package advanced.design_mode.decoratemode;

//抽象装饰类
//如果一个类中没有抽象函数，但是不希望被实例化，也需要定义为抽象类；
abstract class Decorate implements Drink {
    
    //对抽象组件的引用
    private Drink drink;

    public Decorate(Drink drink) {
        this.drink = drink;
    }

    @Override
    public double cost() {
        return this.drink.cost();
    }

    @Override
    public String info() {
        return this.drink.info();
    }


}

